@layout("/common/_container.html"){
<style>
    .ui-state-default {
        height: 40px;
        background: #fff;
        border: 1px solid aliceblue;
        line-height: 40px;
        border-radius: 3px;
        margin-bottom: 2px;
        width: 50%;
    }

    .ui-state-default:hover {
        cursor: pointer;
    }

    .title {
        background: #000;
        color: #fff;
    }

    .sortLeft {
        padding-right: 20px;
    }

    .sortRight {
        padding-right: 20px;
    }

    .ui-sortable {
        /*float: right;*/
    }

    .right_box {
        width: 330px;
        height: 400px;
        position: absolute;
        top: 57px;
        left: 590px;
        border: 1px solid #1E84C6;
    }
</style>
<div class="ibox float-e-margins">
    <div class="ibox-content">
        <div class="form-horizontal" id="addForm">

            <input type="hidden" id="sortMap" value="">
            <input type="hidden" id="reservationsId" value="${reservationsId}">
            <div class="row">
                <div class="col-sm-6 proSort">
                    <div id="revisitInformation">
                    </div>
                    <div class="panel-body">
                        <h2>回访时间</h2>
                    </div>
                    <div style="width:500px;height:300px;overflow:auto;" class="panel panel-success sortRight">
                        <#sortRevisit  id="sortRevisit" list="${revisitRecordList}"/>
                    </div>
                    <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="addVisitedInfoDlg.close()"/>
                </div>
                <div class="col-sm-6">
                    <div class="row">
                        <div id="revisitInformation2">
                        </div>
                        <div class="panel-body">
                            <h2>回访内容</h2>
                        </div>
                        <div id="revisitContentDiv"><textarea id="revisitContent" name="revisitContent" rows=15
                                                              cols=70></textarea></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<link rel="stylesheet" href="${ctxPath}/static/css/jqui/jquery-ui.min.css">
<script src="${ctxPath}/static/js/jquery-ui.min.js"></script>
<script src="${ctxPath}/static/modular/tcCenter/consultant/addVisited_info.js"></script>
<script>
    $("ul#sortRevisit").on("click", "li", function () {      //只需要找到你点击的是哪个ul里面的就行
        $.ajax({
            url: Feng.ctxPath + "/consultant/getRevisitContent",
            type: "post",
            data: {
                "revisitTime": $(this).text(),
                "reservationsId": $("#reservationsId").val()
            },
            success: function (data) {
                $('#revisitContentDiv').html('<textarea id="revisitContent" name="revisitContent" rows=15 cols=70>' + data.revisitContent + '</textarea>');
                $('#revisitInformation').html('<div>  ' +
                    ' 姓名：  ${reservationsInfo.customerName}  &nbsp 性别：  ${reservationsInfo.sex} ' +
                    ' &nbsp 年龄： ${reservationsInfo.customerAge}&nbsp 电话： ${reservationsInfo.customerPhone} </div>');
                $('#revisitInformation2').html('<div> 回访人：' + data.revisit + '</div>');
            },
            error: function (data) {
                alert('内部故障!');
            }
        });
    });
    //点击时间框样式变化
    var dom = document.getElementById("sortDiagnosisDetail");
    var domchilds = document.getElementsByClassName("ui-state-default");
    dom.onclick = function (e) {
        var ev = e.event || window.event;
        for (var i = 0; i < domchilds.length; i++) {
            domchilds[i].style.borderColor = '#d3d3d3';
        }
        ev.target.style.borderColor = 'red';
    }
</script>
@}
